package edu.sctu.practice.yangshengyu.zifuleishiyong;

/**
 * Created by Cullen on 2015/8/27.
 */
/*public class Dog  extends Animal {                                          //  子类的应用
    public void eat(){
        System.out.print("狗狗的名字叫"+name+"年龄是"+age+"爱吃骨头！");
    }                                                          //方法的复写！！
    /**public void eaten(){
        System.out.print("狗狗的名字叫"+name+"年龄是"+age+"爱吃骨头！");
    }*/                                  //被final修饰后的方法不能被复写
   /* public static void main(String[] args) {

        Dog dog = new Dog();                //子类可以拥有父类的所有属性和方法
        dog.age = 18;
        dog.name = "xiaofang";
        dog.eat();
    }
}
//此为子类*/